#include <iostream>
using namespace std;

const int kMod = 998244353;

int QuickPow(int a, int b) {
  int ret = 1;

  for (; b; b >>= 1) {
    if (b & 1) {
      ret = (long long)ret * a % kMod;
    }
    a = (long long)a * a % kMod;
  }
  return ret;
}

int Solve(int n) {
  int f = 1, even_f = 1, odd_f = 1;

  for (int i = 2; i <= n; i++) {
    if (i % 2 == 0) {
      f = odd_f;
      (even_f += f) %= kMod;
    } else {
      f = even_f;
      (odd_f += f) %= kMod;
    }
  }
  return (long long)f * QuickPow(2, kMod - 1 - n) % kMod;
}

int main() {
  ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  int n;
  cin >> n;
  cout << Solve(n) << "\n";
  return 0;
}